package utileria;

import java.awt.GridBagConstraints;
import java.awt.Insets;

import javax.swing.JPanel;
import javax.swing.JTextField;

public class CampoTexto extends JTextField
{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private GridBagConstraints c = new GridBagConstraints();
	
	public CampoTexto(int posicionX, int posicionY, int tamCampo,JPanel panel) 
	{
		this(posicionX,posicionY,1,tamCampo,panel);
	}

	public CampoTexto(int posicionX, int posicionY, int widthX, int tamCampo,JPanel panel) 
	{
		super(tamCampo);
		c.gridx = posicionX;
		c.gridy = posicionY;
		c.gridwidth = widthX;
		c.insets = new Insets(0, 10, 20, 0);
		c.anchor = GridBagConstraints.LAST_LINE_START;
		panel.add(this, c);
	}

}
